<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<button onclick="aaa()">下载</button>

<script>
    function aaa(){
        window.location.href = "http://localhost:8080/test/download";
    }
</script>

</body>
</html>